import EhRequest from "@/service";
import { IDataType } from "@/service/login/types";
interface Result{
  code:number,
  data:object
}
export function getPageListData (url:string,queryInfo:any):any{
  return EhRequest.post<IDataType<Result>>({
    url:url,
    data:queryInfo
  })
}

export function deletePageDataById(url:string){
  return EhRequest.delete<IDataType>({
    url:url
  })
}
//新建
export function createPageData(url:string,newInfo:any){
  return EhRequest.post<IDataType>({
    url:url,
    data:newInfo
  })
}
//编辑
export function editPageData(url:string,editInfo:any){
  return EhRequest.patch<IDataType>({
    url:url,
    data:editInfo
  })
}